package cn.com.lyb.asyncTask.entity;


import java.util.Date;

/**
 * 任务信息
 */
public class TaskInfo {

    /**
     * 暂停标记位
     */
    public volatile Boolean pause = Boolean.FALSE;

    private String taskUid;

    private TaskStatusEnum status;

    private Date startTime;

    private Date endTime;

    private String totalTime;

    private Double processRate;

    public TaskStatusEnum getStatus() {
        return status;
    }

    public void setStatus(TaskStatusEnum status) {
        this.status = status;
    }

    public void setTotalTime(String totalTime) {
        this.totalTime = totalTime;
    }

    public String getTaskUid() {
        return taskUid;
    }

    public void setTaskUid(String taskUid) {
        this.taskUid = taskUid;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getTotalTime() {
        return totalTime;
    }

    public void setTotalTime() {
        this.totalTime = (this.endTime.getTime() - this.startTime.getTime()) + "ms";
    }

    public Double getProcessRate() {
        return processRate;
    }

    public void setProcessRate(Double processRate) {
        this.processRate = processRate;
    }

}